#pragma once
#include "VolumeRenderPCH.h"
#include "TransferFunction.h"

class CTFObj : public IGameObject
{
public:
	CTFObj(const std::string& vGameObjectName, int vExecutionOrder) : IGameObject(vGameObjectName, vExecutionOrder) {}
	~CTFObj() = default;

	void initV() override;
	void updateV() override;

	bool isUsingGradient() { return m_pTransferFunc->isUsingGradient(); }

	const std::shared_ptr<hiveGraphics::STexture> getTransferFuncTex() const { return m_pTransferFuncTex; }

private:
	std::shared_ptr<hiveDVR::CTransferFunction> m_pTransferFunc = std::make_shared<hiveDVR::CTransferFunction>();

	std::shared_ptr<hiveGraphics::STexture> m_pTransferFuncTex = nullptr;

	std::shared_ptr<hiveGraphics::STexture> __createTransferFuncTex2D(size_t vExtent);
	void __updateTransferFuncTex2D();
};